import request from "@/utils/request"

export default {
    //带条件的分页查询
    getPageList(pageNum,limit,searchObj){
        return request({
            url:`/admin/hosp/hospital/list/${pageNum}/${limit}`,
            method :'get',
            params : searchObj  //使用常规参数
        })
    },
    //根据项目id，查询字典子数据列表
    findByParentId(id){
        return request({
            url:`/admin/cmn/dict/findChirdData/${id}`,
            method :'get',
        })
    },
    //根据DictCode，查询字典子数据列表：获取下级节点
    findByDictCode(dictCode){
        return request({
            url:`/admin/cmn/dict/findByDictCode/${dictCode}`,
            method :'get',
        })
    },
    //更新医院上线状态
    updateHospitalStatus(id,status){
        return request({
            url:`/admin/hosp/hospital/updateHospStatus/${id}/${status}`,
            method:"get",
        })
    },
    //医院详情
    showHospDetail(id){
        return request({
            url:`/admin/hosp/hospital/showHospDetail/${id}`,
            method:"get",
        })
    },
    //查询医院所有科室列表
    getDepartmentList(hoscode){
        return request({
            url:`/admin/hosp/department/getDepartmentList/${hoscode}`,
            method:"get",
        })
    },
    getScheduleRule(page, limit, hoscode, depcode) {
        return request({
         url: `/admin/hosp/schedule/getScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
         method: 'get'
        })
    },
    //查询排班详情
    getScheduleDetail(hoscode,depcode,workDate) {
        return request ({
        url: `/admin/hosp/schedule/getScheduleDetail/${hoscode}/${depcode}/${workDate}`,
        method: 'get'
    })
    
  }


}